import { useRouteError } from "react-router-dom";

const ErrorBoundary = () => {
  const err: unknown = useRouteError();
  return (
    <div>
      <p>出错啦～</p>
      <p>错误信息: {(err as Error)?.message}</p>
    </div>
  );
};

export default ErrorBoundary;
